/**
 * Created with JetBrains WebStorm.
 * User: Administrator
 * Date: 15-11-7
 * Time: 上午6:30
 * To change this template use File | Settings | File Templates.
 */
window.onload=function(){
    var url = getUrl();
    $.jsonp({
        url: 'http://'+url+'/api/recommend/news/2',
        data: {type:2},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            $.each(data.arrays,function(index,item){
                var html ='<a href="lvyouziyuanbao_detail.html">'+
                    '<div class="ui-source-pic w_gfsq">'+
                    '<img src="'+item.photos+'" alt="">'+
                    '<h3>自驾车宝典</h3></div></a>' ;
                $(".wrapper").append(html);
            });
        },
        error: function (xOptions, textStatus) {}
    });
}